home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1399_lost_setFlipped_TIFF_image.rtf < prev    next >
Text File  |  1993-11-08  |  2KB  |  39 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Ohlfs;}
  2. \paperw10400
  3. \paperh9200
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red84\green84\blue84;\red83\green83\blue83;\red82\green82\blue82;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  
  8. \fc1\cf1 Why does my View lose its TIFF image after I make a call to 
  9. \b setFlipped
  10. \b0 ?  Here is what I did, and the results I got.\
  11. \
  12. Description:\
  13.  
  14. \fi-980\li980     \
  15. 1.    Create a viewScroller\
  16. 2.    Create an imageView\
  17. 3.    [viewScroller setDocView: imageView];\
  18. 4.    [imageView setFlipped:YES];\
  19. 5.    load tiff file into imageView\
  20. 6.    [imageView display];\
  21.  
  22. \fi0\li0 \
  23. Results:\
  24.  
  25. \fi-980\li980 \
  26. 1.    Without the setFlipped: call, my TIFF image shows up fine, with the scrollers sized respective to the imageView.\
  27. 2.    With the setFlipped: call, my TIFF image DOES NOT show up, BUT the scrollers are sized respective to the imageView AND the y-axis scrollbar shows at the top (like it should be).\
  28.  
  29. \fi0\li0 \
  30.  
  31. \fc0\cf0 A: 
  32. \fc1\cf1  If you composite your TIFF image at the point (0,0), after flipping the view, you won't see anything because the image is in fact now off-screen, i.e. showing at the top left corner (imagine the image height going beyond the y axis—growing upward). However, if you composite at the point (0, height of view rectangle), the image is shown at the lower left corner. Now, if you composite at the point (0, height of the image), the image is shown as hanging from the top left corner.\
  33. \
  34. Valid for 2.0, 3.0\
  35. \
  36. QA695\
  37. \
  38.  
  39.